import GameManager from "./GameManager";
import TouchMonitor, { Touch_ObjectType } from "./TouchMonitor";

const { ccclass, property } = cc._decorator;
@ccclass
export default class GameTigger extends TouchMonitor {

    start(): void {
        switch (this.ID) {
            case 0: break;//苹果点击触发
            case 1: break;//哑铃点击触发
            case 2: break;//睡觉点击触发
            case 3: break;//关闭灯泡点击触发
            case 4: break;//垃圾桶点击触发
            case 5: break;//出门点击触发
            case 6: break;//回房点击触发
            case 7: break;//打开灯泡点击触发
            case 8: break;//门外的花

            case 100: break;//苹果(生成的)
        }
        super.start();
        console.log("asdasd")
    }

    //触摸按下
    OnTouchDown(even) {
        if (GameManager.Instance.GamePause) return;
        super.OnTouchDown(even);
    }
    //触摸拖拽
    OnTouchMove(even) {
        if (GameManager.Instance.GamePause || this.InitPoint == null) return;
        super.OnTouchMove(even);
    }
    //触摸抬起
    OnTouchUp(even) {

        if (this.InitPoint != null) this.Restoration();
        if (GameManager.Instance.GamePause || this.InitPoint == null) return;
        super.OnTouchUp(even);
    }

    //事件接口,拖拽到某位置放开触发_触发事件
    TouchMoveInCident(TargetNode: cc.Node) {

    }

}
